<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page import="com.zsgeek.util.StringHelper"%>
<%
	String path = request.getContextPath();
%>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>加入愿望清单</title>
<link type="text/css" rel="stylesheet" href="star/css/application.css" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet"
	href="Simpletooltip-1.3.0/dist/css/simpletooltip.css"
	media="screen" />
<style>
.select {
	width: 40px;
	border: solid 1px #a7b5bc;
}
</style>
</head>
<body>
	<div class="place">
		<span>位置：</span>
		<ul class="placeul">
			<li><a style="text-decoration:underline;" href="index.jsp">首页</a></li>
			<li><a href="#">亚马逊代购管理</a></li>
			<li><a style="text-decoration:underline;" href="<%=path%>/cart.do?m=info&orderState=1&order_type=7">加入愿望清单</a></li>
			<li><a href="#">订单任务</a></li>
		</ul>
	</div>
	<div class="formbody">
		<form action="<%=path%>/hope.do?m=add" method="post">
			<c:if test="${param.orderNo eq null}">
			     <input type="hidden" id="orderNo" name="orderNo" value="<%=StringHelper.getTimeStamp() %>" /> 
			</c:if>
			<c:if test="${param.orderNo ne null}">
			      <input type="hidden" id="orderNo" name="orderNo" value="${param.orderNo }" />
			</c:if>
			<input type="hidden" name="id" value="${info.id }" /> 
			<input type="hidden" id="siteId" name="siteId" value="${info.siteId }" />
			<input type="hidden" name="type" value="${param.type }" />
			<input type="hidden" name="order_type" value="${param.order_type }" />
			<div id="usual1" class="usual">
				<!-- <ul class="toolbar1">
					<li style="border: none; background: none;">
						<input name="" type="submit" class="btn" value="确认保存" />&nbsp;&nbsp;
						<input name="" type="button" class="btn" value="在线支付" onclick="location.href='pay.jsp'" />
					</li>
				</ul> -->
				<!--<div class="itab">
					<ul>
						<li><a href="#tab1" class="selected">任务信息</a></li>
						<li><a href="#tab2">任务信息</a></li>
					</ul>
				</div> -->
				<div class="formtitle">
					<span>基本信息</span>
				</div>

				<div id="tab1" class="tabson">
					<table style="margin-bottom: 20px; width: 100%;">
						<tr style="height: 50px;">
						    <td align="right">站点<b>*</b></td>
						    <td colspan="7">&nbsp;&nbsp;
								<input type="radio" id="rdocM" name="siteId" checked="checked" value="1" ${info.siteId eq 1 ?"checked='checked'":"" }  />美国&nbsp;&nbsp;
								<input type="radio" id="rdocD" name="siteId" value="2" ${info.siteId eq 2 ?"checked='checked'":"" } />德国 
								<input type="radio" id="rdocY" name="siteId" value="3" ${info.siteId eq 3 ?"checked='checked'":"" } />英国<!-- [填写ASIN码的时候，提示选择站点；] -->
							</td>
						</tr>
						<tr style="height: 50px;">
							<td align="right"><label>ASIN<b>*</b></label>&nbsp;&nbsp;</td>
							<td colspan="4" style="width: 89px;"><input 
								name="asin" value="${info.asin }" type="text" class="dfinput "
								required="required" style="width: 140px;" 
								data-simpletooltip-position="right" title="请输入正确的产品ASIN号码，不能填SKU号码。如果产品分父子产品的，请填子ASIN"/></td>
							
						</tr>
						<tr style="height: 50px;">
							<td align="right"><label>主推关键词<b>*</b></label>&nbsp;&nbsp;</td>
							<td colspan="3"><input name="pro_key"
								 value="${info.pro_key }"
								required="required" style="width: 240px;" type="text"
								class="dfinput" 
								data-simpletooltip-position="right" title="每个代购周期只能选择一个核心关键词"/>&nbsp; <input name="" type="button"
								id="btnLink" class="btn" value="生成链接>>"
								style="background: rgba(179, 183, 186, 0.27); color: #000; width: 99px;" />
							</td>
							<td align="right"><label>超级链接<b>*</b></label>&nbsp;</td>
							<td colspan="3"><input name="pro_url"
								value="${info.pro_url }" type="text" required="required"
								class="dfinput" 
								data-simpletooltip-position="right" title="你可以自己编写超级链接，也可以用左侧的按钮生成。自己编写的超级链接，请确保能正常打开" /></td>
						</tr>
						<tr style="height: 50px;">
							<td align="right"><label>产品标题<b>*</b></label>&nbsp;&nbsp;</td>
							<td colspan="3"><input name="pro_title"
								value="${info.pro_title }" type="text"
								required="required" class="dfinput" 
								data-simpletooltip-position="right" title="请输入完整的产品标题，以便系统核对纠错" /></td>
							<td align="right"><label>中文品名</label>&nbsp;</td>
							<td colspan="3"><input name="pro_name"
								value="${info.pro_name }" type="text" 
								class="dfinput" 
								data-simpletooltip-position="right" title="请输入简短的产品品名，以便日后查看历史纪录"/></td>

						</tr>
					</table>
				</div>


				<div class="formtitle">
					<span>任务排期</span>
				</div>

				<div id="tab2" class="tabson">
					<table class="table   table-bordered">
						<tr>
							<td
								style="text-align: center; background: #13C1E8; color: #fff; font-size: 14px; font-weight: bold; vertical-align: middle;"
								colspan="2" rowspan="2">任务</td>
							<td colspan="10"
								style="text-align: center; background: #13C1E8; color: #fff; font-size: 14px; font-weight: bold;">日期</td>
							<td rowspan="2"
								style="text-align: center; background: #13C1E8; color: #fff; font-size: 14px; font-weight: bold; vertical-align: middle;">总数量</td>
							<td rowspan="2"
								style="text-align: center; background: #13C1E8; color: #fff; font-size: 14px; font-weight: bold; vertical-align: middle;">单笔手续费<br />

							</td>
							<td colspan="2" rowspan="2"
								style="text-align: center; background: #13C1E8; color: #fff; font-size: 14px; font-weight: bold; vertical-align: middle;">总手续费
							</td>
						</tr>
						<tr style="background: #13C1E8; color: #fff;">
							<td><input type="text" id="one_day" name="one_day"
								value="${info.one_day }" class="tableinput"
								style="background: #13C1E8; color: #fff;"
								onfocus="WdatePicker({dateFmt:'M月d日',minDate:'%y-%M-{%d+1}'})" /></td>
							<td style="vertical-align: middle;"><input type="text"
								id="two_day" name="two_day" value="${info.two_day }"
								style="background: #13C1E8; color: #fff;" readonly="readonly"
								class="tableinput" /></td>
							<td style="vertical-align: middle;"><input type="text"
								style="background: #13C1E8; color: #fff;" id="three_day"
								name="three_day" value="${info.three_day }" readonly="readonly"
								class="tableinput" /></td>
							<td style="vertical-align: middle;"><input type="text"
								style="background: #13C1E8; color: #fff;" id="four_day"
								name="four_day" value="${info.four_day }" readonly="readonly"
								class="tableinput" /></td>
							<td style="vertical-align: middle;"><input type="text"
								style="background: #13C1E8; color: #fff;" id="five_day"
								name="five_day" value="${info.five_day }" readonly="readonly"
								class="tableinput" /></td>
							<td style="vertical-align: middle;"><input type="text"
								style="background: #13C1E8; color: #fff;" id="six_day"
								name="six_day" value="${info.six_day }" readonly="readonly"
								class="tableinput" /></td>
							<td style="vertical-align: middle;"><input type="text"
								style="background: #13C1E8; color: #fff;" id="seven_day"
								name="seven_day" value="${info.seven_day }" readonly="readonly"
								class="tableinput" /></td>
							<td style="vertical-align: middle;"><input type="text"
								style="background: #13C1E8; color: #fff;" id="eight_day"
								name="eight_day" value="${info.eight_day }" readonly="readonly"
								class="tableinput" /></td>
							<td style="vertical-align: middle;"><input type="text"
								style="background: #13C1E8; color: #fff;" id="nine_day"
								name="nine_day" value="${info.nine_day }" readonly="readonly"
								class="tableinput" /></td>
							<td style="vertical-align: middle;"><input type="text"
								style="background: #13C1E8; color: #fff;" id="ten_day"
								name="ten_day" value="${info.ten_day }" readonly="readonly"
								class="tableinput" /></td>
						</tr>
						<tr>
							<td rowspan="2"
								style="vertical-align: middle; background: #39885C; color: #fff;">加入 WISH LIST
							</td>
							<td
								style="vertical-align: middle; background: #39885C; color: #fff;">超级链接进入</td>
							<td><input name="wish_url_one_day"
								value="${info.wish_url_one_day}" type="text" maxlength="2"
								class="tableinput" /></td>
							<td><input name="wish_url_two_day"
								value="${info.wish_url_two_day}" type="text" maxlength="2"
								class="tableinput" /></td>
							<td><input name="wish_url_three_day"
								value="${info.wish_url_three_day}" type="text" maxlength="2"
								class="tableinput" /></td>
							<td><input name="wish_url_four_day"
								value="${info.wish_url_four_day}" type="text" maxlength="2"
								class="tableinput" /></td>
							<td><input name="wish_url_five_day"
								value="${info.wish_url_five_day}" type="text" maxlength="2"
								class="tableinput" /></td>
							<td><input name="wish_url_six_day"
								value="${info.wish_url_six_day}" type="text" maxlength="2"
								class="tableinput" /></td>
							<td><input name="wish_url_seven_day"
								value="${info.wish_url_seven_day}" type="text" maxlength="2"
								class="tableinput" /></td>
							<td><input name="wish_url_eight_day"
								value="${info.wish_url_eight_day}" type="text" maxlength="2"
								class="tableinput" /></td>
							<td><input name="wish_url_nine_day"
								value="${info.wish_url_nine_day}" type="text" maxlength="2"
								class="tableinput" /></td>
							<td><input name="wish_url_ten_day"
								value="${info.wish_url_ten_day}" type="text" maxlength="2"
								class="tableinput" /></td>
							<td><input readonly="true" name="wish_url_day_sun" value=""
								type="text" maxlength="2" class="tableinput" value="" /></td>
							<td><input name="wish_url_charge"
								value="${info.id ne null ? info.wish_url_charge : price12}"
								readonly="true" type="text" maxlength="2" class="tableinput" /></td>
							<td><input readonly="true" name="wish_url_sun" type="text"
								maxlength="2" class="tableinput" value="" /></td>
						</tr>
						<tr>
							<td
								style="vertical-align: middle; background: #39885C; color: #fff;">搜索结果进入</td>
							<td><input name="wish_result_one_day"
								value="${info.wish_result_one_day}" type="text" maxlength="2"
								class="tableinput" /></td>
							<td><input name="wish_result_two_day"
								value="${info.wish_result_two_day}" type="text" maxlength="2"
								class="tableinput" /></td>
							<td><input name="wish_result_three_day"
								value="${info.wish_result_three_day}" type="text" maxlength="2"
								class="tableinput" /></td>
							<td><input name="wish_result_four_day"
								value="${info.wish_result_four_day}" type="text" maxlength="2"
								class="tableinput" /></td>
							<td><input name="wish_result_five_day"
								value="${info.wish_result_five_day}" type="text" maxlength="2"
								class="tableinput" /></td>
							<td><input name="wish_result_six_day"
								value="${info.wish_result_six_day}" type="text" maxlength="2"
								class="tableinput" /></td>
							<td><input name="wish_result_seven_day"
								value="${info.wish_result_seven_day}" type="text" maxlength="2"
								class="tableinput" /></td>
							<td><input name="wish_result_eight_day"
								value="${info.wish_result_eight_day}" type="text" maxlength="2"
								class="tableinput" /></td>
							<td><input name="wish_result_nine_day"
								value="${info.wish_result_nine_day}" type="text" maxlength="2"
								class="tableinput" /></td>
							<td><input name="wish_result_ten_day"
								value="${info.wish_result_ten_day}" type="text" maxlength="2"
								class="tableinput" /></td>
							<td><input readonly="true" name="wish_result_day_sun"
								type="text" maxlength="2" class="tableinput" value="" /></td>
							<td><input name="wish_result_charge"
								value="${info.id ne null ? info.wish_result_charge : price12+1}"
								readonly="true" type="text" maxlength="2" class="tableinput" /></td>
							<td><input readonly="true" name="wish_result_sun"
								type="text" maxlength="2" class="tableinput" value="" /></td>
						</tr>
						
						
						<tr style="background: #13C1E8; color: #fff;">
							<td rowspan="2" 
								style="vertical-align: middle; font-weight: bold; font-size: 15px;">订单金额：</td>
							<td colspan="15" rowspan="2" 
								style="font-size: 14px; font-weight: blod; text-align: left; padding-left: 10px;">
								
								手续费总额：&yen;<input
								style="width: 80px; background: #13C1E8; color: #fff;"
								readonly="true" name="procedureNum" type="text" maxlength="2"
								class="tableinput" value="" /><!-- &nbsp;&nbsp;&nbsp;&nbsp;<br /> -->
								总支付金额：<span
								style="font-size: 20px; color: red; background: #13C1E8; color: #fff;">&yen;
									<input style="width: 80px; background: #13C1E8; color: #fff;"
									readonly="true" name="payNum" type="text" maxlength="2"
									class="tableinput" value="" />
							</span>
							</td>

						</tr>

					</table>
				</div>

				<div style="float: right; margin-bottom: 10px;">
					<input name="" type="submit" class="btn" value="保存" /> 
					<!-- <input name="" type="button" class="btn" value="现在支付" /> -->
				</div>


			</div>
		</form>
		<div class="formtitle" style="margin-top:50px;">
					<span>常见问题</span>
		</div>
		<div>
		<ol>
		  <li>Q:为什么要提供小号才能代购？</li>
		  <li>A:万一亚马逊开始严查代购的，受惩罚的肯定是小号，你的主账号不会有任何风险。</li>
		</ol>
		</div>
				
	</div>
	<script type="text/javascript" src="js/jquery-1.8.1.min.js"></script>
	<script type="text/javascript" src="star/lib/jquery.raty.min.js"></script>
	<script type="text/javascript" src="js/My97DatePicker/WdatePicker.js"></script>
	<script type="text/javascript"
		src="Simpletooltip-1.3.0/dist/js/simpletooltip.js"></script>
	<script type="text/javascript"
		src="js/hopeData.js?v=<%=StringHelper.getCurrentTimeStamp()%>"></script>
	<script type="text/javascript"
		src="js/date.js?v=<%=StringHelper.getCurrentTimeStamp()%>"></script>
	<script type="text/javascript">
	var d = new Date();
		//$("#usual1 ul").idTabs();
		//$('.tablelist tbody tr:odd').addClass('odd');
		  $(function() {
				  var asin = $("input[name='asin']");
				  var pro_key = $("input[name='pro_key']");
				  var pro_url = $("input[name='pro_url']");
				  var pro_title = $("input[name='pro_title']");
				  var pro_name = $("input[name='pro_name']");
				  asin.simpletooltip({ });
				  pro_key.simpletooltip({ });
				  pro_url.simpletooltip({ });
				  pro_title.simpletooltip({ });
				  pro_name.simpletooltip({ });
			  
		    $.fn.raty.defaults.path = '<%=path%>/star/lib/img';

			/*根据地址栏传过来的type的值来判断，是【修改：0】还是【查看：1】操作;
				若为【查看】，隐藏提交保存按钮 ---start---*/
			var type = $("input[name='type']");
			if (type.val() == 1) {
				$(".btn").hide();
			} else {
				$(".btn").show();
			}
			/*--end--*/
			
			var orderNo = '${param.orderNo}';
			if (orderNo == "") {
				$(".btn").click(function() {
					 if($('#rdocM').attr("checked")){
						 $("#siteId").val("1");
					 }else if($('#rdocD').attr("checked")){
						 $("#siteId").val("2");
					 }else{
						 $("#siteId").val("3");
					 }
				 });

			} else {

				// 合计：
				sun();

			} 
		});
	</script>

</body>
</html>